<!--formGroup，formControll是属性指令绑定的时候需要使用[],formGroupName，formControlName，formArrayName 不需要使用[]-->
<form [formGroup] = 'formGroup' (submit)="onSubmit()">
  <div formGroupName = 'dateRange'>
    起始日期：<input formControlName="from" type="date">
    截止日期：<input formControlName="to" type="date">
  </div>
  <div>
    <ul formArrayName="email">
      <li *ngFor="let item of this.formGroup.get('email').controls;let i=index;">
        <input type="text" [formControlName]='i'>
      </li>
    </ul>
  </div>
  <button type="button" (click)="AddEmail()">新增邮件输入框</button>
  <button type="submit">提交</button>
</form>